<?php
/*

Copyright 2009 Matthew C. Dettinger

This program is free software: you can redistribute it and/or modify 
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/

session_start();

require 'libs/common_functions.php';
require 'dao/data_group.php';
require 'dao/file.php';
require 'dao/session.php';
require 'dao/user.php';

// load config file	and check for local copy
if (file_exists("local_config.php")) {
	require 'local_config.php';
} else if(file_exists("config.php")) {
	require 'config.php';
}

echo "<h1>Why hello thar!</h1>";

if (!isset($_SESSION[session_uuid])) {
	include 'authenticate_user.php';
	exit();
}

dao_session_check_session($config, $_SESSION);

$data_group_list = dao_data_group_list_user_data_groups($config);
print_r($data_group_list);

include 'add_new_data_group.php';
include 'add_new_file.php';
include 'add_new_user.php';

echo '<a href="logout.php">Log Out</a>';





?>